package com.sinog.front.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @desc 配置静态访问资源
 * @author lzq
 * @date 2020-09-15 1:26 下午
 */
@Configuration
public class MyConfigureAdapter implements WebMvcConfigurer {

    /**
     * 配置静态访问资源
     * @param registry registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/**").addResourceLocations("classpath:/static/");
    }
}